home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.BorderLayout;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.Panel;
- import java.awt.Scrollbar;
- import java.awt.TextField;
-
- public class zmaze3d extends Applet {
- public boolean clearUserAttempts;
- public boolean hexagonalRooms;
- private zmazectl zmazectl;
- public zmazecan zmazecan;
- public TextField message;
- public boolean solutionDisplayed;
- public double tilt;
- private Scrollbar tiltScrollbar;
-
- public void init() {
- this.solutionDisplayed = false;
- ((Container)this).setLayout(new BorderLayout());
- new Panel();
- this.hexagonalRooms = false;
- this.zmazecan = new zmazecan(this);
- ((Container)this).add("Center", this.zmazecan);
- this.zmazectl = new zmazectl(this);
- ((Container)this).add("South", this.zmazectl);
- this.tilt = (double)45.0F;
- this.tiltScrollbar = new Scrollbar(1, (int)this.tilt, 5, 30, 60);
- ((Container)this).add("East", this.tiltScrollbar);
- this.message = new TextField(117);
- this.message.setEditable(false);
- ((Container)this).add("North", this.message);
- ((Applet)this).resize(600, 350);
- if (this.hexagonalRooms) {
- this.message.setText("Verwenden Sie Home, Up, PgUp, Ende, Dn Pfeil, oder PgDn zum Spielen.");
- } else {
- this.message.setText("Verwenden Sie die Pfeiltasten zum Spielen.");
- }
- }
-
- public void start() {
- this.zmazectl.enable();
- }
-
- public void stop() {
- this.zmazectl.disable();
- }
-
- public boolean handleEvent(Event var1) {
- boolean var2;
- if (var1.target == this.tiltScrollbar) {
- if (!this.zmazecan.p.alreadyPainting) {
- if (!this.solutionDisplayed && !this.zmazecan.p.userHasSolved) {
- if (this.hexagonalRooms) {
- this.message.setText("Verwenden Sie Home, Up, PgUp, Ende, Dn Pfeil, oder PgDn zum Spielen.");
- } else {
- this.message.setText("Verwenden Sie die Pfeiltasten zum Spielen.");
- }
- } else {
- this.message.setText("");
- }
- }
-
- this.tilt = (double)(90 - this.tiltScrollbar.getValue());
- this.zmazecan.paint(this.zmazecan.getGraphics());
- var2 = true;
- } else {
- var2 = false;
- }
-
- return var2;
- }
-
- public static void main(String[] var0) {
- }
- }
-